<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

	<head>

		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

        <!-- 移动端视口说明 -->
		<meta name="viewport" content="width=device-width,height=device-height,initial-scale=1.0,maximum-scale=1.0,user-scalable=no">

		<title><?php echo C('WEB_TITLE');?></title>

		<link rel="stylesheet" href="/Public/css/common.css"/>

		<link rel="stylesheet" href="/Public/js/layui/css/layui.css"/>

        <link rel="stylesheet prefetch" href="/Public/js/photoswipe/photoswipe.css">

        <link rel="stylesheet prefetch" href="/Public/js/photoswipe/default-skin/default-skin.css">

		<link rel="stylesheet" href="/Public/mobile/css/crm-mobile-terminal.css"/>
		<link rel="stylesheet" href="/Public/js/jeDate/skin/jedate.css">
		<link rel="stylesheet" href="/Public/js/mobile-date/mobile-date.css">
		<link rel="stylesheet" href="/Public/js/mobileSelect/mobileSelect.css">

        <link rel="stylesheet" href="<?php echo C('MOBILE_ICON_HTTP');?>"/>

		<script type="text/javascript" >

			const moduleName = "<?php echo (MODULE_NAME); ?>";

		</script>

		<script type="text/javascript" src="/Public/js/jquery-1.9.1.min.js"></script>

		<script type="text/javascript" src="/Public/js/cookie/jquery.cookie.js"></script>

		<script type="text/javascript" src="/Public/js/lang/<?php echo (getStrToLower(cookie('think_language'))); ?>.js"></script>

		<script type="text/javascript" src="/Public/js/layer/layer.js"></script>

		<script type="text/javascript" src="/Public/js/layui/layui.js"></script>

		<script type="text/javascript" src="/Public/js/WeChat/wechatglobal.js"></script>

		<script type="text/javascript" src="/Public/js/WeChat/wechatupload.js"></script>

		<script type="text/javascript" src="/Public/js/photoswipe/photoswipe.min.js"></script>

		<script type="text/javascript" src="/Public/js/photoswipe/photoswipe-ui-default.min.js"></script>

        <script type="text/javascript" src="/Public/js/WeChat/iscroll.js"></script>

		<script type="text/javascript" src="/Public/js/mobile-date/mobile-date.js"></script>
		
		<script type="text/javascript" src="/Public/js/jeDate/src/jedate.js"></script>
		
		<script type="text/javascript" src="/Public/mobile/js/crm-window.js"></script>
		
		<script type="text/javascript" src="/Public/js/feeldesk-slide.js"></script>

		<script type="text/javascript" src="/Public/js/photoswipe/photohtml.js"></script>

		<style type="text/css">

            body{background-color: #fafafa}

        </style>

		<script type="text/javascript" src="/Public/js/uni.webview.1.5.2.js"></script>

		<script type="text/javascript">

			//整合版：当前页为首页发送消息给整合系统并更改页面样式
			if(self!=top)
			{
				var isIframe=true;
			}

			var isFeelecApp = false;

			if(isIframe)
			{
				document.addEventListener("UniAppJSBridgeReady", function ()
				{
					uniPostHome();
				});
			}

			document.addEventListener('UniAppJSBridgeReady', function()
			{
				uni.getEnv(function(res)
				{
					if (res.plus)//res.h5
					{
						isFeelecApp = true;

						uniPostHome();
					}
				});
			});

			function uniPostHome()
			{
				var think_controller = "<?php echo (CONTROLLER_NAME); ?>";
				var think_action = "<?php echo (ACTION_NAME); ?>";

				if(think_controller+"/"+think_action == "Index/index")
				{
					uni.postMessage({
						data: {
							isHome: true
						}
					});
				}
				else
				{
					uni.postMessage({
						data: {
							isHome: false
						}
					});
				}
			}

		</script>

	</head>

    <body>



<div class="feeldesk" id="formWrapper">

	<form action="<?php echo ($controllerAndAction); ?>" method="get" id="filterForm">

    <header>

        <div class="menu-header">

			<!--<div class="header-title"><?php echo L('CUSTOMER_LIST');?></div>

            <?php echo FEELCRM('Customer/create','','','header-right','','iconfont icon-xie');?>-->

			<input type="search" name="keyword" value="<?php echo ($keyword); ?>" placeholder="<?php echo L('NAME2');?>/<?php echo L('PHONE');?>/<?php echo L('MAILBOX');?>/<?php echo L('COMPANY');?>" id="keyword" class="header-serach-input" />

        </div>

    </header>

	<div class="feelcrm-list-choice">

		<div class="fl feelcrm-list-sort"><?php echo L('SORT');?><i class="iconfont icon-sort"></i></div>

		<div class="fl feelcrm-list-screen"><?php echo L('FILTER');?><i class="iconfont icon-shaixuan"></i></div>

		<div class="clear"></div>

	</div>

	<div class="feelcrm-sort hidden">

		<input type="hidden" name="sort" value="<?php echo ($sort); ?>" />

		<a href="javascript:selectsort('followtime-asc');"><div class="feelcrm-sort-list <?php if(($sort) == "followtime-asc"): ?>sort-active<?php endif; ?>"><?php echo L('POSITIVE_ORDER_LAST_FOLLOW_UP_TIME');?><i class="iconfont icon-gouxuan"></i></div></a>

		<a href="javascript:selectsort('followtime-desc');"><div class="feelcrm-sort-list <?php if(($sort) == "followtime-desc"): ?>sort-active<?php endif; ?>"><?php echo L('REVERSE_ORDER_LAST_FOLLOW_UP_TIME');?><i class="iconfont icon-gouxuan"></i></div></a>

		<a href="javascript:selectsort('createtime-asc');"><div class="feelcrm-sort-list <?php if(($sort) == "createtime-asc"): ?>sort-active<?php endif; ?>"><?php echo L('POSITIVE_ORDER_BY_CREATION_TIME');?><i class="iconfont icon-gouxuan"></i></div></a>

		<a href="javascript:selectsort('createtime-desc');"><div class="feelcrm-sort-list border-none <?php if(($sort) == "createtime-desc"): ?>sort-active<?php endif; ?>"><?php echo L('REVERSE_ORDER_BY_CREATION_TIME');?><i class="iconfont icon-gouxuan"></i></div></a>

	</div>

	<div class="feelcrm-screen hidden">

		<div class="feelcrm-screen-list">

			<div class="fl feelcrm-screen-list-L">

				<div onclick="switchScreen(this,1)" class="feelcrm-screen-title feelcrm-screen-title-active"><div class="feelcrm-screen-titlename"><?php echo L('SCREENING_SCENE');?></div></div>

				<div onclick="switchScreen(this,2)" class="feelcrm-screen-title"><div class="feelcrm-screen-titlename"><?php echo L('LEADER');?></div></div>

				<?php if(!empty($isCreaterView)): ?><div onclick="switchScreen(this,3)" class="feelcrm-screen-title"><div class="feelcrm-screen-titlename"><?php echo L('FOUNDER');?></div></div><?php endif; ?>

			</div>

			<div class="fl feelcrm-screen-list-R" id="screen-layer1">

				<input type="hidden" name="customer_auth" value="<?php echo ($customer_auth); ?>" />

				<?php if(($isAllViewAuth) > "0"): ?><div data-value="all" class="feelcrm-screen-info feelcrm-customer-auth <?php if(($customer_auth) == "all"): ?>feelcrm-screen-infoactive<?php endif; ?>"><div class="feelcrm-screen-infoname" ><?php echo L('WHOLE');?><i class="iconfont icon-gouxuan"></i></div></div><?php endif; ?>

				<?php if(($isOwnViewAuth) > "0"): ?><div data-value="own" class="feelcrm-screen-info feelcrm-customer-auth <?php if(($customer_auth) == "own"): ?>feelcrm-screen-infoactive<?php endif; ?>"><div class="feelcrm-screen-infoname" ><?php echo L('MYCLUES');?><i class="iconfont icon-gouxuan"></i></div></div><?php endif; ?>

				<?php if(($isGroupViewAuth) > "0"): ?><div data-value="group" class="feelcrm-screen-info feelcrm-customer-auth <?php if(($customer_auth) == "group"): ?>feelcrm-screen-infoactive<?php endif; ?>"><div class="feelcrm-screen-infoname" ><?php echo L('CLUES_IN_MY_DEPARTMENT');?><i class="iconfont icon-gouxuan"></i></div></div><?php endif; ?>

				<?php if(($isCluePoolAuth) > "0"): ?><div data-value="pool" class="feelcrm-screen-info feelcrm-customer-auth <?php if(($customer_auth) == "pool"): ?>feelcrm-screen-infoactive<?php endif; ?>"><div class="feelcrm-screen-infoname" ><?php echo L('HIGH_SEAS');?><i class="iconfont icon-gouxuan"></i></div></div><?php endif; ?>

			</div>

			<div class="fl feelcrm-screen-list-R feelcrm-screen-member hidden" id="screen-layer2">

				<div class="feelcrm-screen-info-member"><div class="feelcrm-screen-infoname" ><?php echo L('BELONG');?></div></div>

				<div id="cc-item">

					<div class="feelcrm-screen-info-member feelcrm-screen-member-select" id="select-cc">

						<div class="feelcrm-screen-infoname" ><?php echo L('SELECT_LEADER');?><i class="iconfont icon-gengduo1"></i></div>

						<?php if(is_array($ccList)): $i = 0; $__LIST__ = $ccList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><span data-id='<?php echo ($vo["member_id"]); ?>'>@<?php echo ($vo["member_name"]); ?></span><?php endforeach; endif; else: echo "" ;endif; ?>

					</div>

					<?php if(is_array($ccList)): $i = 0; $__LIST__ = $ccList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><input type="hidden" name="cc[]" value="<?php echo ($vo["member_id"]); ?>"><?php endforeach; endif; else: echo "" ;endif; ?>

				</div>

			</div>

			<?php if(!empty($isCreaterView)): ?><div class="fl feelcrm-screen-list-R feelcrm-screen-member hidden" id="screen-layer3">

					<div class="feelcrm-screen-info-member"><div class="feelcrm-screen-infoname" ><?php echo L('BELONG');?></div></div>

					<div id="creater-item">

						<div class="feelcrm-screen-info-member feelcrm-screen-member-select" id="select-creater">

							<div class="feelcrm-screen-infoname" ><?php echo L('PLEASE_SELECT_THE_CREATOR');?><i class="iconfont icon-gengduo1"></i></div>

							<?php if(is_array($createrList)): $i = 0; $__LIST__ = $createrList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><span data-id='<?php echo ($vo["member_id"]); ?>'>@<?php echo ($vo["member_name"]); ?></span><?php endforeach; endif; else: echo "" ;endif; ?>

						</div>

						<?php if(is_array($createrList)): $i = 0; $__LIST__ = $createrList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><input type="hidden" name="creater[]" value="<?php echo ($vo["member_id"]); ?>"><?php endforeach; endif; else: echo "" ;endif; ?>

					</div>

				</div><?php endif; ?>

			<div class="clear"></div>

		</div>

		<div class="clear"></div>

		<div class="feelcrm-screen-oper" >

			<div class="fl feelcrm-screen-custom" id="select-screen"><?php echo L('CUSTOM_FILTER');?></div>

			<div class="fr"><span class="feelcrm-screen-reset"><?php echo L('RESET');?></span> <span class="feelcrm-screen-finish"><?php echo L('COMPLETE');?></span></div>

		</div>

		<div class="clear"></div>

	</div>

	</form>

	<div class="feeldesk-main plr2 no-footer-main feelcrm-customer-main" >

        <div class='feeldesk-item' id='customerItem'>



        </div>

        <div class="buoy-shade hidden"></div>

<div class="feeldesk-buoy">

    <div class="operate-buoy hidden">

        <?php if($groupSystemAuth['crm_auth'] == 1 && $isCreateCrmClueAuth > 0): ?><a href="<?php echo C('HTTP_PROTOCOL');?>://<?php echo C('HOST_DOMAIN');?>/CrmMobile/Clue/create" class="crm-buoy"><span><?php echo L('ADD_CLUE');?></span><img src="/Public/mobile/img/clue-buoy.png" alt="" width="100%"></a><?php endif; ?>

        <?php if($groupSystemAuth['crm_auth'] == 1 && $isCreateCrmCustomerAuth > 0): ?><a href="<?php echo C('HTTP_PROTOCOL');?>://<?php echo C('HOST_DOMAIN');?>/CrmMobile/Customer/create" class="crm-buoy"><span><?php echo L('ADD_CUSTOMER');?></span><img src="/Public/mobile/img/crm-buoy.png" alt="" width="100%"></a><?php endif; ?>

        <?php if($groupSystemAuth['crm_auth'] == 1 && $isCreateCrmOpportunityAuth > 0): ?><a href="<?php echo C('HTTP_PROTOCOL');?>://<?php echo C('HOST_DOMAIN');?>/CrmMobile/Opportunity/create" class="crm-buoy"><span><?php echo L('ADD_OPPORTUNITY');?></span><img src="/Public/mobile/img/opportunity-buoy.png" alt="" width="100%"></a><?php endif; ?>

        <?php if($groupSystemAuth['ticket_auth'] == 1 && $isCreateTicketAuth > 0): ?><a href="<?php echo C('HTTP_PROTOCOL');?>://<?php echo C('HOST_DOMAIN');?>/Mobile/Ticket/template" class="ticket-buoy"><span><?php echo L('CREATE_TICKET');?></span><img src="/Public/mobile/img/ticket-buoy.png" alt="" width="100%"></a><?php endif; ?>

    </div>

    <a href="javascript:" class="create-buoy"><img src="/Public/mobile/img/feeldesk-buoy.png" alt="" width="100%" class="transfer0"></a>

</div>

<script type="text/javascript">

	$(function()
	{
		$('.create-buoy').unbind('click').on('click',function()
		{
			var createBuoy = $(this).find('img');

			createBuoy.toggleClass('transfer45').toggleClass('transfer0');

			$('.operate-buoy').fadeToggle('300');

			$('.buoy-shade').fadeToggle('fast').unbind('click').on('click',function()
			{
				$('.operate-buoy').fadeOut('fast');

				$(this).fadeOut('fast');

				createBuoy.toggleClass('transfer45').toggleClass('transfer0');
			});
		})
	})

</script>


    </div>

</div>

<div class="feelcrm-sort-layer hidden"></div>

<div class="feelcrm-screen-layer hidden"></div>

<div class="feeldesk" id="screenWrapper">

	<header>

        <div class="menu-header">

            <a href="javascript:" class="iconfont icon-back-left back" id="screenBack"></a>

            <div class="header-title"><?php echo L('ADD_FILTER');?></div>

			<a href="javascript:" class="header-right" id="finish-clue-screen"><?php echo L('SAVE');?></a>

        </div>

    </header>

	<div class="feeldesk-main no-footer-main pd0">

        <div class="screen-main">

			<div class="group-item">

				<div class="group-name"><?php echo L('CHOSEN');?></div>

				<ul class="member-item">

					<li class="screen-member-info <?php if(!in_array('1', $SelectedscreenFixed)): ?>hidden<?php endif; ?>" onclick="cancelSelectFixed(this,1)" id="screen-selected-fixed-1">

						<span class="iconfont icon-check icon-checkbox-checked"></span>

						<div class="member-name"><?php echo L('CLUE_NO');?></div>

						<i class="iconfont icon-shanchu"></i>

					</li>

					<li class="screen-member-info <?php if(!in_array('2', $SelectedscreenFixed)): ?>hidden<?php endif; ?>" onclick="cancelSelectFixed(this,2)" id="screen-selected-fixed-2">

						<span class="iconfont icon-check icon-checkbox-checked"></span>

						<div class="member-name"><?php echo L('STATUS');?></div>

						<i class="iconfont icon-shanchu"></i>

					</li>

					<?php if(is_array($clueform)): $i = 0; $__LIST__ = $clueform;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><li class="screen-member-info <?php if(!in_array($vo['form_id'], $Selectedscreen)): ?>hidden<?php endif; ?>" onclick="cancelSelect(this,<?php echo ($vo["form_id"]); ?>)" id="screen-selected-<?php echo ($vo["form_id"]); ?>">

							<span class="iconfont icon-check icon-checkbox-checked"></span>

							<div class="member-name"><?php echo ($vo["form_description"]); ?></div>

							<i class="iconfont icon-shanchu"></i>

						</li><?php endforeach; endif; else: echo "" ;endif; ?>

				</ul>

				<div class="group-name"><?php echo L('OTHER_OPTIONS');?></div>

				<ul class="member-item">

					<li class="screen-member-info <?php if(in_array('1', $SelectedscreenFixed)): ?>hidden<?php endif; ?>" onclick="toSelectFixed(this,1)" id="screen-list-fixed-1">

						<span class="iconfont icon-check"></span>

						<div class="member-name"><?php echo L('CLUE_NO');?></div>

					</li>

					<li class="screen-member-info <?php if(in_array('2', $SelectedscreenFixed)): ?>hidden<?php endif; ?>" onclick="toSelectFixed(this,2)" id="screen-list-fixed-2">

						<span class="iconfont icon-check"></span>

						<div class="member-name"><?php echo L('STATUS');?></div>

					</li>

					<?php if(is_array($clueform)): $i = 0; $__LIST__ = $clueform;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><li class="screen-member-info <?php if(in_array($vo['form_id'], $Selectedscreen)): ?>hidden<?php endif; ?>" onclick="toSelect(this,<?php echo ($vo["form_id"]); ?>)" id="screen-list-<?php echo ($vo["form_id"]); ?>">

							<span class="iconfont icon-check"></span>

							<div class="member-name"><?php echo ($vo["form_description"]); ?></div>

						</li><?php endforeach; endif; else: echo "" ;endif; ?>

				</ul>

			</div>

        </div>

    </div>

	<?php if(is_array($Selectedscreen)): $i = 0; $__LIST__ = $Selectedscreen;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><input type="hidden" name="screen[]" value="<?php echo ($vo); ?>"><?php endforeach; endif; else: echo "" ;endif; ?>

	<?php if(is_array($SelectedscreenFixed)): $i = 0; $__LIST__ = $SelectedscreenFixed;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><input type="hidden" name="screenFixed[]" value="<?php echo ($vo); ?>"><?php endforeach; endif; else: echo "" ;endif; ?>

</div>

<!--选择客户负责人-->
<div class="feeldesk" id="ccWrapper">

    <header>

        <div class="menu-header">

            <a href="javascript:" class="iconfont icon-back-left back" id="ccBack"></a>

            <div class="header-title"><?php echo L('SELECT_LEADER');?></div>

        </div>

    </header>

    <div class="feeldesk-main no-footer-main pd0">

        <div class="main-search">

            <i class="iconfont icon-search"></i>

            <input type="text" name="keyword" value="" placeholder="<?php echo L('SEARCH');?>" id="ccSearch">

        </div>

        <div class="cc-choose-all" id="ccChooseAll">

            <div><?php echo L('SELECT_ALL');?></div>

            <span class="iconfont icon-check"></span>

        </div>

        <div class="cc-main" id="cc-list">

            <?php if(is_array($FormData["groups"])): $i = 0; $__LIST__ = $FormData["groups"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v1): $mod = ($i % 2 );++$i;?><div class="group-item">

                    <div class="group-name"><?php echo ($v1["group_name"]); ?></div>

                    <ul class="member-item">

                        <?php if(is_array($FormData["members"])): $i = 0; $__LIST__ = $FormData["members"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v2): $mod = ($i % 2 );++$i; if(in_array(($v1["group_id"]), is_array($v2['group_id'])?$v2['group_id']:explode(',',$v2['group_id']))): ?><li class="cc-member-info" data-value="<?php echo ($v2["member_id"]); ?>" data-name="<?php echo ($v2["name"]); ?>">

                                    <img src="<?php echo ((isset($v2["face"]) && ($v2["face"] !== ""))?($v2["face"]):'/Attachs/face/face.png'); ?>" alt="">

                                    <div class="member-name"><?php echo ($v2["name"]); ?></div>

                                    <span class="iconfont icon-check <?php if(in_array(($v2["member_id"]), is_array($cc)?$cc:explode(',',$cc))): ?>icon-checkbox-checked<?php endif; ?>"></span>

                                </li><?php endif; endforeach; endif; else: echo "" ;endif; ?>

                    </ul>

                </div><?php endforeach; endif; else: echo "" ;endif; ?>

        </div>

    </div>

</div>

<!--选择客户创建人-->
<div class="feeldesk" id="createrWrapper">

	<header>

		<div class="menu-header">

			<a href="javascript:" class="iconfont icon-back-left back" id="createrBack"></a>

			<div class="header-title"><?php echo L('PLEASE_SELECT_THE_CREATOR');?></div>

		</div>

	</header>

	<div class="feeldesk-main no-footer-main pd0">

		<div class="main-search">

			<i class="iconfont icon-search"></i>

			<input type="text" name="keyword" value="" placeholder="<?php echo L('SEARCH');?>" id="createrSearch">

		</div>

		<div class="cc-choose-all" id="createrChooseAll">

			<div><?php echo L('SELECT_ALL');?></div>

			<span class="iconfont icon-check"></span>

		</div>

		<div class="creater-main" id="creater-list">

			<?php if(is_array($FormData["groups"])): $i = 0; $__LIST__ = $FormData["groups"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v1): $mod = ($i % 2 );++$i;?><div class="group-item">

					<div class="group-name"><?php echo ($v1["group_name"]); ?></div>

					<ul class="member-item">

						<?php if(is_array($FormData["members"])): $i = 0; $__LIST__ = $FormData["members"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v2): $mod = ($i % 2 );++$i; if(in_array(($v1["group_id"]), is_array($v2['group_id'])?$v2['group_id']:explode(',',$v2['group_id']))): ?><li class="creater-member-info" data-value="<?php echo ($v2["member_id"]); ?>" data-name="<?php echo ($v2["name"]); ?>">

									<img src="<?php echo ((isset($v2["face"]) && ($v2["face"] !== ""))?($v2["face"]):'/Attachs/face/face.png'); ?>" alt="">

									<div class="member-name"><?php echo ($v2["name"]); ?></div>

									<span class="iconfont icon-check <?php if(in_array(($v2["member_id"]), is_array($creater)?$creater:explode(',',$creater))): ?>icon-checkbox-checked<?php endif; ?>"></span>

								</li><?php endif; endforeach; endif; else: echo "" ;endif; ?>

					</ul>

				</div><?php endforeach; endif; else: echo "" ;endif; ?>

		</div>

	</div>

</div>

<script type="text/javascript" src="/Public/mobile/js/cc.js"></script>


<div class="feeldesk-footer">

    <style>
        .footer-nav li{width:calc(100% / 3) !important;}
    </style>

    <ul class="footer-nav">

        <li class="fl" >

            <a href="<?php echo C('HTTP_PROTOCOL');?>://<?php echo C('HOST_DOMAIN');?>/<?php echo ($system); ?>" class="<?php if((CONTROLLER_NAME) == "Index"): ?>active<?php endif; ?>">

                <i class="iconfont icon-home"></i>

                <p><?php echo L('WORKBENCH');?></p>

            </a>

        </li>

		<!--<li class="fl">

            <a href="<?php echo U('Customer/index');?>" class="<?php if((CONTROLLER_NAME) == "Customer"): ?>active<?php endif; ?>">

                <i class="iconfont icon-notify"></i>

                <p><?php echo L('CUSTOMER');?></p>

            </a>

        </li>-->

        <?php if(!empty($mobile["menuAuth"]["isCenterAuth"])): ?><li class="fr" id="ispersonal">

                <a href="<?php echo C('HTTP_PROTOCOL');?>://<?php echo C('HOST_DOMAIN');?>/Mobile/Setting/index?system=<?php echo ($system); ?>" class="<?php if((CONTROLLER_NAME) == "Setting"): ?>active<?php endif; ?>">

                    <i class="iconfont icon-my"></i>

                    <p><?php echo L('PERSONAL');?></p>

                </a>

            </li><?php endif; ?>

		<li class="fr relative messageli">

            <a href="<?php echo U('Message/getMessage');?>" class="<?php if((CONTROLLER_NAME) == "Message"): ?>active<?php endif; ?>">

                <i class="iconfont icon-notify"></i>

                <p><?php echo L('NOTIFY');?></p>

                <?php if(!empty($unReadMessageNum)): ?><span class="message-num"><?php if(($unReadMessageNum) > "99"): ?>99+<?php else: echo ($unReadMessageNum); endif; ?></span><?php endif; ?>

            </a>

        </li>

    </ul>

</div>

<script type="text/javascript">

    $(".transfer").on('click',function()
    {
        $(this).find('i').toggleClass('icon-tianjia2');

        $(".transfer-nav").slideToggle('fast');

        $("#ticketPannel").toggleClass('pb120');
    })

    //整合版：当前页为首页发送消息给整合系统并更改页面样式
    if (isIframe || isFeelecApp)
    {
        $('.footer-nav li').css('cssText', 'width:calc(100% / 2) !important;');

        $('#ispersonal').hide();
    }
</script>

<script type="text/javascript">

	CustomerScreen('clue');

	$("#keyword").on('keypress', function(e) {
        var keycode = e.keyCode;
        //获取搜索框的值
        var searchContent = $(this).val();
        if (keycode == '13') {
            e.preventDefault();
            //请求搜索接口
            $('#filterForm').submit();
        }
    });

	function selectsort(type)
	{
		$('input[name="sort"]').val(type);

		$('#filterForm').submit();
	}

	function switchScreen(obj,k)
	{
		$('.feelcrm-screen-title').removeClass('feelcrm-screen-title-active');

		$(obj).addClass('feelcrm-screen-title-active');

		$('.feelcrm-screen-list-R').hide();

		$('#screen-layer'+k).show();
	}

	$(function()
	{
		$('.feelcrm-list-sort').click(function(){

			if($(this).hasClass('feelcrm-list-active'))
			{
				$(this).removeClass('feelcrm-list-active');

				$('.feelcrm-sort-layer').hide();
			}
			else
			{
				$(this).addClass('feelcrm-list-active');

				$('.feelcrm-sort-layer').show();
			}

			if($('.feelcrm-list-screen').hasClass('feelcrm-list-active'))
			{
				$('.feelcrm-list-screen').removeClass('feelcrm-list-active');
			}

			$('.feelcrm-screen-layer').hide();

			$('.feelcrm-screen').hide();

			$('.feelcrm-sort').toggle();

		})

		$('.feelcrm-list-screen').click(function(){

			if($(this).hasClass('feelcrm-list-active'))
			{
				$(this).removeClass('feelcrm-list-active');

				$('.feelcrm-screen-layer').hide();
			}
			else
			{
				$(this).addClass('feelcrm-list-active');

				$('.feelcrm-screen-layer').show();
			}

			if($('.feelcrm-list-sort').hasClass('feelcrm-list-active'))
			{
				$('.feelcrm-list-sort').removeClass('feelcrm-list-active');
			}

			$('.feelcrm-sort-layer').hide();

			$('.feelcrm-sort').hide();

			$('.feelcrm-screen').toggle();

		})

		$('.feelcrm-customer-auth').unbind('click').click(function(){

			$('.feelcrm-customer-auth').removeClass('feelcrm-screen-infoactive');

			$(this).addClass('feelcrm-screen-infoactive');

			var customer_auth = $(this).attr('data-value');

			$('input[name="customer_auth"]').val(customer_auth);

		})

		$('.feelcrm-screen-finish').click(function(){

			$('#filterForm').submit();

		})
		$('.feelcrm-screen-reset').click(function(){

			$('.feelcrmScreen').find('.feelcrm-screen-info').removeClass('feelcrm-screen-infoactive');

			$('.feelcrmScreen').children(".feelcrm-screen-info:first-child").addClass('feelcrm-screen-infoactive');

			$('.feelcrmScreen').find('input').val('');

			$('.feelcrmScreen').find("input[data-type='checkbox']").remove();

			$.each($('.feelcrm-screen-member').find("input[name='cc[]']"),function(){

				var val = $(this).val();

				$(this).parent().find(".feelcrm-screen-member-select span[data-id='"+val+"']").remove();

				$(this).remove();

			});

			$.each($('.feelcrm-screen-member').find("input[name='creater[]']"),function(){

				var val = $(this).val();

				$(this).parent().find(".feelcrm-screen-member-select span[data-id='"+val+"']").remove();

				$(this).remove();

			});

			layer.msg("<?php echo L('RESET_THE_SUCCESS');?>");
		})
	})

    layui.use('flow', function()
    {
        var flow = layui.flow;

        flow.load(
        {
            elem: '#customerItem',
            scrollElem:'.feeldesk-main',
            isAuto:false,
            done: function(page, next)
            {
                var url = "<?php echo (ACTION_NAME); ?>";

                var lis = [];

				var keyword = "<?php echo ($keyword); ?>";

				var sort = "<?php echo ($sort); ?>";

				var customer_auth = "<?php echo ($customer_auth); ?>";

                $.get("<?php echo U('clue/'.ACTION_NAME);?>?p="+page+"&request=flow&keyword="+keyword+"&sort="+sort+"&customer_auth="+customer_auth, function(data)
                {

					if(data.data.length > 0)
					{
						layui.each(data.data, function(index, item)
						{
							var url = "<?php echo U('Clue/detail');?>?id="+item.clue_id;

							var trade_str = "";

							var follow_str = "<div class='customer-server'><?php echo L('NOT_YET_FOLLOWED_UP');?></div>";

							if(item.status == 2)
							{
								trade_str = "<span class='customer-list-label customer-trade bg-2c6ee5'><?php echo L('CONVERTED');?></span>";
							}
							else if(item.status == 1)
							{
								trade_str = "<span class='customer-list-label customer-trade bg-85D654'><?php echo L('FOLLOWING_UP');?></span>";
							}
							else
							{
								trade_str = "<span class='customer-list-label customer-trade bg-ffae3a'><?php echo L('NOT_FOLLOWED_UP');?></span>";
							}

							if(item.follow_member)
							{
								follow_str = "<div class='customer-server'>"+item.follow_member+" "+item.follow_time+" "+item.follow_content+"</div>";
							}

							var items ="<div class='feeldesk-list customer-list relative'><a href='"+url+"' class='clearfix customer-item'><div class='feeldesk-list-left'><div class='customer-name ellipsis'>"+item.detail.name+"</div>"+trade_str+follow_str+"</div></a></div>";

							lis.push(items);
						});

						next(lis.join(''), page < data.pages);
					}
					else
					{
						var items = "";

						lis.push(items);

						next(lis.join(''), page < data.pages);
					}
                });

            }
        });
    });

</script>